-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `office_management_system`
--

-- --------------------------------------------------------

--
-- Table structure for table `ci_sessions`
--

CREATE TABLE IF NOT EXISTS `ci_sessions` (
  `id` varchar(128) NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `data` blob NOT NULL,
  PRIMARY KEY (`id`,`ip_address`),
  KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_admin_memo`
--

CREATE TABLE IF NOT EXISTS `oms_admin_memo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `important` int(1) NOT NULL DEFAULT '0',
  `title` varchar(100) NOT NULL,
  `description` varchar(5000) NOT NULL,
  `status` int(1) NOT NULL DEFAULT '1' COMMENT '0=delete\r\n1=publish',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_application`
--

CREATE TABLE IF NOT EXISTS `oms_application` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `application_type_id` int(3) NOT NULL DEFAULT '1',
  `reason` varchar(200) NOT NULL,
  `attachment` varchar(100) DEFAULT NULL,
  `day` int(11) NOT NULL,
  `application_date` date NOT NULL,
  `apply_daterange` varchar(30) NOT NULL,
  `status` int(2) NOT NULL DEFAULT '1' COMMENT '1=pending\r\n2=approve\r\n3=reject\r\n4=cancel',
  `approved_by` int(11) NOT NULL DEFAULT '0' COMMENT 'admin id\r\n0=new request',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `application_type_id` (`application_type_id`,`status`,`approved_by`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_application_admin_message`
--

CREATE TABLE IF NOT EXISTS `oms_application_admin_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `application_id` int(11) NOT NULL,
  `admin_id` int(11) NOT NULL,
  `title` varchar(100) NOT NULL,
  `description` varchar(8000) NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_application_group`
--

CREATE TABLE IF NOT EXISTS `oms_application_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `application_id` int(11) NOT NULL,
  `application_message_id` int(11) NOT NULL,
  `status` int(2) NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_application_staff_message`
--

CREATE TABLE IF NOT EXISTS `oms_application_staff_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `application_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `title` varchar(100) NOT NULL,
  `description` varchar(8000) DEFAULT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_application_type`
--

CREATE TABLE IF NOT EXISTS `oms_application_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL DEFAULT '1',
  `status` int(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_claim`
--

CREATE TABLE IF NOT EXISTS `oms_claim` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `claim_type_id` int(3) NOT NULL DEFAULT '1',
  `remark` varchar(200) NOT NULL,
  `attachment` varchar(100) DEFAULT NULL,
  `day` int(11) NOT NULL,
  `claim_date` date NOT NULL,
  `amount` double(16,2) NOT NULL,
  `status` int(2) NOT NULL DEFAULT '1' COMMENT '1=pending\r\n2=approve\r\n3=reject\r\n4=cancel',
  `approved_by` int(11) NOT NULL DEFAULT '0' COMMENT 'admin id\r\n0=new request',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_claim_admin_message`
--

CREATE TABLE IF NOT EXISTS `oms_claim_admin_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `claim_id` int(11) NOT NULL,
  `admin_id` int(11) NOT NULL,
  `title` varchar(100) NOT NULL,
  `description` varchar(8000) NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_claim_group`
--

CREATE TABLE IF NOT EXISTS `oms_claim_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `claim_id` int(11) NOT NULL,
  `claim_message_id` int(11) NOT NULL,
  `status` int(2) NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_claim_staff_message`
--

CREATE TABLE IF NOT EXISTS `oms_claim_staff_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `claim_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `title` varchar(100) NOT NULL,
  `description` varchar(8000) DEFAULT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_claim_type`
--

CREATE TABLE IF NOT EXISTS `oms_claim_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL,
  `status` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_department`
--

CREATE TABLE IF NOT EXISTS `oms_department` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `status` int(2) NOT NULL DEFAULT '1',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_department_memo`
--

CREATE TABLE IF NOT EXISTS `oms_department_memo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `department_id` int(11) NOT NULL,
  `important` int(1) NOT NULL DEFAULT '0',
  `title` varchar(100) NOT NULL,
  `description` varchar(5000) NOT NULL,
  `status` int(1) NOT NULL DEFAULT '1' COMMENT '0=delete\r\n1=publish',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_staff_payroll`
--

CREATE TABLE IF NOT EXISTS `oms_staff_payroll` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `basic_salary` double NOT NULL,
  `allowance` double NOT NULL,
  `epf_employer_contribute` double(16,2) NOT NULL,
  `epf_employee_contribute` double(16,2) NOT NULL,
  `socso_employer_contribute` double(16,2) NOT NULL,
  `socso_employee_contribute` double(16,2) NOT NULL,
  `eis_employer_contribute` double(16,2) NOT NULL,
  `eis_employee_contribute` double(16,2) NOT NULL,
  `total_epf_contribute` double(16,2) NOT NULL,
  `total_socso_contribute` double(16,2) NOT NULL,
  `payroll_day` varchar(7) NOT NULL,
  `status` int(2) NOT NULL DEFAULT '1',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_staff_payroll_addition`
--

CREATE TABLE IF NOT EXISTS `oms_staff_payroll_addition` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payroll_id` int(11) NOT NULL,
  `pay_title` varchar(255) NOT NULL,
  `pay_type` tinyint(1) NOT NULL,
  `pay_date` varchar(7) NOT NULL,
  `pay_amount` double(16,2) NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_staff_payroll_addition_type`
--

CREATE TABLE IF NOT EXISTS `oms_staff_payroll_addition_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_staff_salary_wallet`
--

CREATE TABLE IF NOT EXISTS `oms_staff_salary_wallet` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `start_salary` double(16,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_groups`
--

CREATE TABLE IF NOT EXISTS `oms_sys_groups` (
  `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
  `admin_group` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(20) NOT NULL,
  `description` varchar(100) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `oms_sys_groups`
--

INSERT INTO `oms_sys_groups` (`id`, `admin_group`, `name`, `description`, `status`) VALUES
(1, 1, 'admin', 'master', 1),
(2, 0, 'members', 'General User', 1),
(3, 1, 'Accountant', 'Financial management', 1);

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_groups_permission`
--

CREATE TABLE IF NOT EXISTS `oms_sys_groups_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `modules_function_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `allow_view` tinyint(1) NOT NULL DEFAULT '1',
  `allow_create` tinyint(1) NOT NULL DEFAULT '1',
  `allow_update` tinyint(1) NOT NULL DEFAULT '1',
  `allow_delete` tinyint(1) NOT NULL DEFAULT '1',
  `allow_all` tinyint(1) NOT NULL DEFAULT '1',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `user_id` int(11) NOT NULL,
  `last_user_id` int(11) NOT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_login_attempts`
--

CREATE TABLE IF NOT EXISTS `oms_sys_login_attempts` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `ip_address` varchar(45) NOT NULL,
  `login` varchar(100) NOT NULL,
  `time` int(11) UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_modules`
--

CREATE TABLE IF NOT EXISTS `oms_sys_modules` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `icon` varchar(100) NOT NULL DEFAULT 'fas fa-fw fa-cog',
  `controller` varchar(100) NOT NULL,
  `path` varchar(100) DEFAULT NULL,
  `dropdown` tinyint(1) NOT NULL DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `oms_sys_modules`
--

INSERT INTO `oms_sys_modules` (`id`, `name`, `icon`, `controller`, `path`, `dropdown`, `status`, `date_added`, `last_update`) VALUES
(1, 'Manage User', 'fa fa-user', 'admin-permission', 'user_detail', 1, 1, '2022-01-26 02:03:54', '2022-01-26 02:04:08'),
(2, 'Manage Memo', 'fa fa-cog', 'admin', 'memo-detail', 1, 1, '2022-01-26 02:06:40', '2022-01-26 02:07:39'),
(3, 'Manage Staff', 'fa fa-cog', 'admin', 'staff-detail', 1, 1, '2022-01-26 02:08:06', '2022-01-26 02:08:06'),
(4, 'Manage Department', 'fa fa-cog', 'admin', 'department-detail', 1, 1, '2022-01-26 02:08:23', '2022-01-26 02:08:23'),
(5, 'Manage Payroll', 'fa fa-cog', 'admin', 'salaries-detail', 1, 1, '2022-01-26 02:08:41', '2022-01-26 02:08:41'),
(6, 'Manage Application', 'fa fa-cog', 'admin', 'application-detail', 1, 1, '2022-01-26 02:08:53', '2022-01-26 02:08:53'),
(7, 'Manage Claim', 'fa fa-cog', 'admin', 'claim-detail', 1, 1, '2022-01-26 02:09:08', '2022-01-26 02:09:08');

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_modules_function`
--

CREATE TABLE IF NOT EXISTS `oms_sys_modules_function` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `modules_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `icon` varchar(100) NOT NULL DEFAULT 'fas fa-fw fa-cog',
  `controller` varchar(100) NOT NULL,
  `function` varchar(100) NOT NULL,
  `path` varchar(200) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_modules_function_sort`
--

CREATE TABLE IF NOT EXISTS `oms_sys_modules_function_sort` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `modules_function_id` int(11) NOT NULL,
  `sort` smallint(3) NOT NULL DEFAULT '0',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_modules_sort`
--

CREATE TABLE IF NOT EXISTS `oms_sys_modules_sort` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `modules_id` int(11) NOT NULL,
  `sort` smallint(3) NOT NULL DEFAULT '0',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `oms_sys_modules_sort`
--

INSERT INTO `oms_sys_modules_sort` (`id`, `modules_id`, `sort`, `date_added`, `last_update`) VALUES
(1, 1, 1, '2022-01-26 02:03:54', '2022-01-26 02:03:54'),
(2, 2, 2, '2022-01-26 02:06:40', '2022-01-26 02:06:40'),
(3, 3, 3, '2022-01-26 02:08:06', '2022-01-26 02:08:06'),
(4, 4, 4, '2022-01-26 02:08:23', '2022-01-26 02:08:23'),
(5, 5, 5, '2022-01-26 02:08:41', '2022-01-26 02:08:41'),
(6, 6, 6, '2022-01-26 02:08:53', '2022-01-26 02:08:53'),
(7, 7, 7, '2022-01-26 02:09:08', '2022-01-26 02:09:08');

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_user`
--

CREATE TABLE IF NOT EXISTS `oms_sys_user` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `ip_address` varchar(45) NOT NULL,
  `username` varchar(100) DEFAULT NULL,
  `password` varchar(255) NOT NULL COMMENT '$2y$08$200Z6ZZbp3RAEXoaWcMA6uJOFicwNZaqk4oDhqTUiFXFe63MG.Daa',
  `email` varchar(254) NOT NULL,
  `phone` varchar(13) NOT NULL,
  `activation_selector` varchar(255) DEFAULT NULL,
  `activation_code` varchar(255) DEFAULT NULL,
  `forgotten_password_selector` varchar(255) DEFAULT NULL,
  `forgotten_password_code` varchar(255) DEFAULT NULL,
  `forgotten_password_time` int(11) UNSIGNED DEFAULT NULL,
  `remember_selector` varchar(255) DEFAULT NULL,
  `remember_code` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_login` int(45) DEFAULT NULL,
  `active` tinyint(1) UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uc_email` (`email`),
  UNIQUE KEY `uc_activation_selector` (`activation_selector`),
  UNIQUE KEY `uc_forgotten_password_selector` (`forgotten_password_selector`),
  UNIQUE KEY `uc_remember_selector` (`remember_selector`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `oms_sys_user`
--

INSERT INTO `oms_sys_user` (`id`, `ip_address`, `username`, `password`, `email`, `phone`, `activation_selector`, `activation_code`, `forgotten_password_selector`, `forgotten_password_code`, `forgotten_password_time`, `remember_selector`, `remember_code`, `status`, `created_on`, `last_login`, `active`) VALUES
(1, '127.0.0.1', 'administrator', '$2y$12$W40kl/EwaGvUFDKU0T2MVO.aHqbUgNG6zEIQ3P95cjE/rHJK7Z7sa', 'admin@admin.com', '01114068848', NULL, NULL, NULL, NULL, NULL, '2826164f5eca92711f264e833ce42738445f673a', '$2y$10$xoUhXyWlWRnFkh/mprptDOGhQIIeor65.NydqRT6SBJm1OhvwBZYq', 1, '2022-01-17 01:33:34', 1643158273, 1),
(2, '127.0.0.1', 'staffa', '$2y$10$ikQTMt.UQn0TPerYGQmys.k5eDBt.JYJKRspPoFGjbAI.pV3.BvdC', 'staffa@gmail.com', '111111111111', NULL, NULL, NULL, NULL, NULL, 'a2b12447a375fd43fd8c96a13217236f044e8d6c', '$2y$10$TR6J0/pxM1/Kj3i6yVEkKuVX6XHmBPWYxXLqRddTluJKfPBbzzFj.', 1, '2022-01-17 01:35:19', 1643166408, 1),
(3, '127.0.0.1', 'staffb', '$2y$10$CVFTtu8CX8SiuSxXLTaiSe1OZ9pkGeq9LwlT396OM2Z38L9oiYJ7i', 'staffb@gmail.com', '222222222222', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2022-01-18 02:56:41', NULL, 1),
(4, '127.0.0.1', 'staffc', '$2y$10$6r3TSR4tLJlB3P7s7hr2Re/388zoO0xw2/uBGc81/2MIgSTaqV.9W', 'staffc@gmail.com', '333333333333', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2022-01-21 05:50:30', NULL, 1),
(5, '127.0.0.1', 'valentine', '$2y$10$/bGNl/0I/Svj93RstXYmRu.gJ4vTYGb4PUWoMri5yta62FvKh9tyy', 'valentine.workshop11@gmail.com', '01114068848', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2022-01-24 07:51:08', NULL, 1);

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_users_groups`
--

CREATE TABLE IF NOT EXISTS `oms_sys_users_groups` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(11) UNSIGNED NOT NULL,
  `group_id` mediumint(8) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uc_users_groups` (`user_id`,`group_id`),
  KEY `fk_users_groups_users1_idx` (`user_id`),
  KEY `fk_users_groups_groups1_idx` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `oms_sys_users_groups`
--

INSERT INTO `oms_sys_users_groups` (`id`, `user_id`, `group_id`) VALUES
(13, 1, 1),
(5, 2, 2),
(6, 3, 2),
(7, 4, 2),
(14, 5, 1);

-- --------------------------------------------------------

--
-- Table structure for table `oms_sys_user_detail`
--

CREATE TABLE IF NOT EXISTS `oms_sys_user_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `epf_no` varchar(20) NOT NULL,
  `basic_salary` double(16,2) NOT NULL,
  `full_name` varchar(200) NOT NULL,
  `NRIC` varchar(12) NOT NULL,
  `email_address` varchar(100) NOT NULL,
  `phone` varchar(12) NOT NULL,
  `address` varchar(200) NOT NULL,
  `annual_leave` int(11) NOT NULL DEFAULT '7',
  `department_id` int(11) NOT NULL DEFAULT '0',
  `start_join` date NOT NULL,
  `end_join` date DEFAULT NULL,
  `DOB` date DEFAULT NULL,
  `status` int(2) NOT NULL DEFAULT '1',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `oms_sys_user_detail`
--

INSERT INTO `oms_sys_user_detail` (`id`, `user_id`, `epf_no`, `basic_salary`, `full_name`, `NRIC`, `email_address`, `phone`, `address`, `annual_leave`, `department_id`, `start_join`, `end_join`, `DOB`, `status`, `date_added`, `last_update`) VALUES
(1, 2, '111111111111', 1500.00, 'staff a', '111111111111', 'staffa@gmail.com', '111111111111', 'staff a address', 7, 1, '2022-01-17', NULL, NULL, 1, '2022-01-17 01:35:19', '2022-01-20 04:05:33'),
(2, 3, '222222222222', 2000.00, 'staff b', '222222222222', 'staffb@gmail.com', '222222222222', 'staff b address', 7, 2, '2022-01-18', NULL, NULL, 1, '2022-01-18 02:56:41', '2022-01-18 03:01:58'),
(3, 4, '333333333333', 2000.00, 'staff c', '333333333333', 'staffc@gmail.com', '333333333333', 'staff c address', 7, 4, '2022-01-14', NULL, NULL, 1, '2022-01-21 05:50:30', '2022-01-21 05:50:30');

--
-- Constraints for dumped tables
--

--
-- Constraints for table `oms_sys_users_groups`
--
ALTER TABLE `oms_sys_users_groups`
  ADD CONSTRAINT `fk_users_groups_groups1` FOREIGN KEY (`group_id`) REFERENCES `oms_sys_groups` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_users_groups_users1` FOREIGN KEY (`user_id`) REFERENCES `oms_sys_user` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
COMMIT;

